import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const test = r => require.ensure([], () => r(require('@/page/test')), 'test');
const login = r => require.ensure([], () => r(require('@/page/login')), 'login');
const index = r => require.ensure([], () => r(require('@/page/index')), 'index');
const index1 = r => require.ensure([], () => r(require('@/page/index1')), 'index1');
const demo = r => require.ensure([], () => r(require('@/page/demo')), 'demo');
const emp = r => require.ensure([], () => r(require('@/components/emp')), 'emp');
const routes = [
	{
		path: '/login',
		component: login
	},
	{
		path: '/test',
		component: test
	},
	{
		path: '/index',
		component: index,
		name: '',
	},
	{
		path: '/emp',
		component: emp,
		name: '',
	},
	{
		path: '/index1',
		component: index1,
		name: '',
	},
	{
		path: '/demo',
		component: demo,
		name: '',
	}
]

export default new Router({
  mode: 'history',
  base: '/xzwj/',
  routes,
  strict: process.env.NODE_ENV !== 'production',
})
